﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using TiaoTaoHelper.Wtm.Models;
using HengTong.Model;
using HengTong.Model.Db.Hr.Bill;


namespace HengTong.ViewModel.Daily.SysDailyOutFactoryRequestBillVms
{
    public partial class SysDailyOutFactoryRequestBillTemplateVm : BaseTemplateVM
    {
        [Display(Name = "员工工号")]
        public ExcelPropety StaffNoExcel = ExcelPropety.CreateProperty<SysDailyOutFactoryRequestBill>(x => x.StaffNo);
        [Display(Name = "员工姓名")]
        public ExcelPropety NameExcel = ExcelPropety.CreateProperty<SysDailyOutFactoryRequestBill>(x => x.Name);
        [Display(Name = "出厂时间")]
        public ExcelPropety OutFactoryTimeExcel = ExcelPropety.CreateProperty<SysDailyOutFactoryRequestBill>(x => x.OutFactoryTime);
        [Display(Name = "预计返回时间")]
        public ExcelPropety ExpectedReturnTimeExcel = ExcelPropety.CreateProperty<SysDailyOutFactoryRequestBill>(x => x.ExpectedReturnTime);
        [Display(Name = "事由")]
        public ExcelPropety ReasonExcel = ExcelPropety.CreateProperty<SysDailyOutFactoryRequestBill>(x => x.Reason);
        [Display(Name = "审批人")]
        public ExcelPropety ApproverExcel = ExcelPropety.CreateProperty<SysDailyOutFactoryRequestBill>(x => x.Approver);
        [Display(Name = "审批时间")]
        public ExcelPropety ApprovalTimeExcel = ExcelPropety.CreateProperty<SysDailyOutFactoryRequestBill>(x => x.ApprovalTime);
        [Display(Name = "所属部门")]
        public ExcelPropety GroupExcel = ExcelPropety.CreateProperty<SysDailyOutFactoryRequestBill>(x => x.GroupId);
        [Display(Name = "单据编号")]
        public ExcelPropety BillCodeExcel = ExcelPropety.CreateProperty<SysDailyOutFactoryRequestBill>(x => x.BillCode);
        [Display(Name = "单据状态")]
        public ExcelPropety BillStatusExcel = ExcelPropety.CreateProperty<SysDailyOutFactoryRequestBill>(x => x.BillStatus);
        [Display(Name = "工作流状态")]
        public ExcelPropety WorkflowStatusExcel = ExcelPropety.CreateProperty<SysDailyOutFactoryRequestBill>(x => x.WorkflowStatus);
        [Display(Name = "备注")]
        public ExcelPropety RemarkExcel = ExcelPropety.CreateProperty<SysDailyOutFactoryRequestBill>(x => x.Remark);

	    protected override void InitVM()
        {
            GroupExcel.DataType = ColumnDataType.ComboBox;
            GroupExcel.ListItems = DC.Set<SysGroup>().GetSelectListItems(Wtm, y => y.GroupName);
        }

    }

    public class SysDailyOutFactoryRequestBillImportVm : BaseImportVM<SysDailyOutFactoryRequestBillTemplateVm, SysDailyOutFactoryRequestBill>
    {

    }

}
